freq=4; amp=0.3; decay=0.5; if (numKeys>1 && time>key(2).time) { v=velocityAtTime(key(2).time-0.01); x=time-key(2).time; s=amp*v*Math.sin(x*freq)/Math.exp(x*decay); value+s; } else {value}